package com.aischool.api;

import com.aischool.routes.RouteMapping;
import com.aischool.service.FileUploadService;
import com.aischool.utils.JsonResult;
import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;

@RouteMapping(url = "/api/file")
public class FileController extends Controller {

	@Inject
	FileUploadService fileUploadService;
	
	public void upload() {
		JsonResult jr = fileUploadService.uploadFile(this);
		renderJson(jr.Dic);
	}
	
	public void bigUpload() {
		JsonResult jr = fileUploadService.bigUpload(this);
		renderJson(jr.Dic);
	}
}
